<script id="list-tpl" type="text/html"
        data-params='{"url":"/education/admin/product","dataName":"productData","pageid":"#page", "method":"post"}'>
    <table id="example" class="layui-table lay-even" data-name="productData" data-tplid="list-tpl">
        <thead>
        <tr>
            <th width="30"><input type="checkbox" id="checkall" data-name="checkbox" lay-filter="check"
                                  lay-skin="primary"></th>
            <th>产品名</th>
            <th>产品编号</th>
            <th>产品图片</th>
            <th width="80">市场价格(元)</th>
            <th width="80">会员价格(元)</th>
            <th>规格描述</th>
            <th width="80">库存(件)</th>
            <th width="80">销量</th>
            <th width="70">状态</th>
            <th width="120">添加时间</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        {{# layui.each(d.list, function(index, item){ }}
        <tr>
            <td><input type="checkbox" name="checkbox" value="{{ item.id}}" lay-skin="primary"></td>
            <td>{{ item.product_name||'' }}</td>
            <td>{{ item.product_no||'' }}</td>
            <td>
                <img src="/education{{ item.cover_image }}" alt="..." class="img-thumbnail" style="height: 60px;">
            </td>
            <td>{{ item.market_price||'' }}</td>
            <td>{{ item.vip_price||'' }}</td>
            <td>{{ item.spec_desc||''}}</td>
            <td>{{ item.stock||'' }}</td>
            <td><input type="text" class="layui-input ajax-blur" name="sales"
                       value="{{ item.sales || '' }}"
                       data-params='{"url":"/education/admin/product/updateSales/{{ item.id}}"}'> </td>
            <td>{{# if(item.status == 0){ }} <span style="color: red;"> 下架 </span>{{# }
                else if(item.status ==1 ){ }}上架 {{# }
                else{ }} <span style="color: blue;">预售</span> {{# } }}</td>
            <td>{{ item.create_time||'' }}</td>
            <td>
                <!--<button class="layui-btn layui-btn-mini" onclick="_skuManage('{{item.id}}','{{item.product_name}}');">规格</button>-->
                <div class="tab-menu layui-btn layui-btn-mini">
                    <a href="javascript:;" data-url="module/productSku.html?ids={{item.id}}"
                       data-parent="true"
                       data-title="【{{item.product_name}}】规格管理">
                        <span style="color: white">规格</span>
                    </a>
                </div>
                <button class="layui-btn layui-btn-mini" onclick="_edit('{{item.id}}','{{item.product_name}}');">编辑</button>
                <button class="layui-btn layui-btn-mini" onclick="_picManage('{{item.id}}','{{item.product_name}}');">图片</button>
                <button class="layui-btn layui-btn-mini" onclick="_commentManage('{{item.id}}','{{item.product_name}}');">评价</button>
            </td>
        </tr>
        {{# }); }}
        </tbody>

    </table>
</script>